﻿using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using DadaLib;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace DadaistTests
{
    [TestClass]
    public class SerializeTests
    {

        [TestMethod]
        public void SerializeGeneratorWorks()
        {
            var generator1 = new Generator(Util.SamplesFolder + "odyssey.txt");
            generator1.Analize();
            generator1.SaveToFile(Util.SamplesFolder + "odyssey.gen");
            Generator generator2 = Generator.ReadFromFile(Util.SamplesFolder + "odyssey.gen");
            var comp = new Composer(generator2);
            var sentence = comp.ComposeSentence(40);
            Console.WriteLine(sentence);
        }


    }
}
